#pragma once

#include "XmlUtil.h"
#include "ShaderManager.h"

class Texture;

class Material
{
public:
	Material(void);
	~Material(void);

public:
	BOOL LoadFromXml( XmlNode * materialNode );

public:
	void		SetName( std::string name ) { m_name = name; }
	std::string	GetName()	{ return m_name; }

	void		SetShaderType( ShaderType shaderType ) { m_shaderType = shaderType; }
	ShaderType	GetShaderType()	{ return m_shaderType; }

public:
	void 		AddIntData( std::string name, int data );
	void 		AddFloatData( std::string name, float data );
	void 		AddDwordData( std::string name, DWORD data );	// color etc..
	void 		AddTextureData( std::string name, Texture * data );

	int			GetIntData( std::string name );
	float		GetFloatData( std::string name );
	DWORD		GetDwordData( std::string name );
	Texture *	GetTextureData( std::string name );

public:
	void		RemoveAll();

private:
	std::string m_name;

	ShaderType	m_shaderType;

	std::map<std::string, DWORD> m_materialDataList;
	std::map<std::string, Texture*> m_textureDataList;
};
